<script>
  window.onload = function () {
    const MD5 = "FILE_MD5_CONTENTS";
    localStorage.setItem("new_md5", MD5);
    const file_md5 = localStorage.getItem("md5");
    const page = localStorage.getItem("cachedPage");
    console.log("cur md5: " + file_md5 + " new md5: " + MD5);
    if (!page || file_md5 != MD5) {
      window.location.href = "/index";
    } else {
      document.open();
      document.write(page);
      document.close();
    }
  };
</script>
